package com.xoa.service.hr;

import com.xoa.global.proxy.SpringContextUtil;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @program: xoa
 * @description: 人力资源工厂
 * @author: xiaomeng.Yu
 * @create: 2018-07-27 16:33
 **/
@Component
public class HumanResourcesFactory {

    public HumanResources getHumanResourcesList(Integer typeId) throws ClassNotFoundException{
        HumanResources humanResources = null;
        ApplicationContext applicationContext = SpringContextUtil.getApplicationContext();
        Class c = null;
        switch (typeId){
            case 1:
                c = Class.forName("");
                humanResources = (HumanResources) applicationContext.getBean(c);
                break;
            case 2:
                c=Class.forName("com.xoa.service.hr.HrStaffContractService");
                humanResources = (HumanResources) applicationContext.getBean(c);
                break;
            case 3:
                c=Class.forName("");
                humanResources = (HumanResources) applicationContext.getBean(c);
                break;
            case 4:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 5:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 6:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 7:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 8:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 9:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 10:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 11:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 12:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 13:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 14:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 15:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 16:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
            case 17:
                c=Class.forName("");
                humanResources =(HumanResources) applicationContext.getBean(c);
                break;
        }
        return humanResources;
    };
}
